# -*- coding: utf-8 -*-
import xlrd

from venv1.Public.mysqlHelper import MysqlHelper


class dbClection:

    def getOrgid(self):
        filename = r'..\\data\\testdata.xlsx'
        excel_open = xlrd.open_workbook(filename)
        table = excel_open.sheet_by_name('Sheet1')
        rows = table.nrows


        resultList = list()
        for i in range(2, rows):
            # cur = self.connection.cursor()
            row_content = table.row_values(i)
            policyNo = row_content[76]
            if policyNo=='':
                print('没有数据')
            else:

                results = MysqlHelper().queryPolicy(policyNo)
                resultList.append(results)
        return resultList


if __name__ == '__main__':
    db = dbClection()
    print(db.getOrgid())
